<template>
  <div class="apply">
    <Navigation :logoName="logoName" :routeInfo="routeInfo"></Navigation>
    <div class="formContent">
      
       <ArbitDetail :basicInfo="basicInfo"></ArbitDetail>
        <p class="line arbitline"><span class="title arbitline">仲裁规则文书
          <a @click="ruledoc(basicInfo.secretaryReview&&basicInfo.secretaryReview.rulesInstrument)"><icon class="connectAddr"></icon>附件链接</a>
          <a @click="ruledoc(basicInfo.secretaryReview&&basicInfo.secretaryReview.previewRulesInstrument)"><icon class="preview"></icon>预览</a></span>
        </p>
        <p class="line arbitline"><span class="title arbitline">仲裁申请书
          <a @click="ruledoc(basicInfo.secretaryReview&&basicInfo.secretaryReview.applicationArbitration)"><icon class="connectAddr"></icon>附件链接</a>
          <a @click="ruledoc(basicInfo.secretaryReview&&basicInfo.secretaryReview.previewApplicationArbitration)"><icon class="preview"></icon>预览</a></span>
        </p>
        <p class="line arbitline"><span class="title arbitline">应诉通知书
          <a @click="ruledoc(basicInfo.secretaryReview&&basicInfo.secretaryReview.noticeRespondingAction)"><icon class="connectAddr"></icon>附件链接</a>
          <a @click="ruledoc(basicInfo.secretaryReview&&basicInfo.secretaryReview.previewNoticeRespondingAction)"><icon class="preview"></icon>预览</a></span>
        </p>
        <div class="show">
        <div class="btn-sty">
          <span class="btn btn-apply" @click="back">返回</span>
          <span class="btn btn-complete btn-arbit" @click="complete">审理</span>
        </div>
      </div>
      
    </div>
    
  </div>
</template>

<script>
import Navigation from '../common/navigation'
import ArbitDetail from '../common/arbitdetail'
export default {
  name: 'ArbitratorVerify',
  data(){
     return {
        logoName:'书面审理',
        routeInfo:'首页/仲裁立案受理/书面审理',
        meansCorrect:'',
        meansWhole:'',
        idea:'',
        applyINfo:false,
        unapplyINfo:false,
        basicInfo:{},
        evidence:[],
        basicInfos:this.$route.params.caseno,
        formRight: {
            input1: '',
            input2: '',
            input3: ''
        }
     }
  },
  props: {
    msg: String
  },
  methods:{
    ruledoc(param){
      if(param){
        window.open(param)
      }else{
        this.$Message.warning('文件为空');
      }
    },
    back(){
      this.$router.push('/Syspage/ArbitratordirectorIndex')
    },
    detail(){
      
    },
    complete(){
          this.$http.post('/api'+this.urls.arbVerifyCase,{
            attache_status:1,
            case_status:1,
            caseNo:this.$route.params.caseno
          }).then((result)=>{
              if(result.data.code==200){
                this.$Message.success('审核成功');
                // setTimeout(()=>{
                    this.$router.push('/Syspage/ArbitratordirectorIndex');
                // },500)
              }else{
                this.$Message.error('审核失败');
              }
          }) 
        
    },
    cancel(){

    },
    handleSubmit () {
      
    },
    applyIN(){
      this.applyINfo=!this.applyINfo;
    },
    unapplyIN(){
      this.unapplyINfo=!this.unapplyINfo;
    }
  },
  components:{Navigation,ArbitDetail},
  created(){
    this.$http.post('/api'+this.urls.getCaseDetail,{caseNo:this.$route.params.caseno}).then((result)=>{
          if(result.data.code==200){
              this.basicInfo=result.data.data;
          }
    })
  }
  // created(){
  //     this.$http.get('/api'+this.urls.getCaseDetail+this.$route.params.caseno).then((result)=>{
  //         if(result.data.code==200){
  //           this.basicInfo=result.data.data.arbitratorsCaseDetail;
  //           this.evidence=result.data.data.arbitratorsCaseDetail.evidence?result.data.data.arbitratorsCaseDetail.evidence.split(','):[]
  //         }
  //     }) 
  // }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
  .show{
    margin:0 20px;
    /* padding-top: 30px; */
  }
</style>
